3.3.76 \(\int \frac {(A+B \log (\frac {e (a+b x)^2}{(c+d x)^2}))^2}{f+g x} \, dx\) [276]

3.3.76.1 Optimal result
3.3.76.2 Mathematica [B] (verified)
3.3.76.3 Rubi [A] (verified)
3.3.76.4 Maple [F]
3.3.76.5 Fricas [F]
3.3.76.6 Sympy [F(-1)]
3.3.76.7 Maxima [F]
3.3.76.8 Giac [F]
3.3.76.9 Mupad [F(-1)]

3.3.76.1 Optimal result

Integrand size = 31, antiderivative size = 285 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=-\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{g}+\frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2 \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g}-\frac {4 B \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{g}+\frac {4 B \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right ) \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g}+\frac {8 B^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{g}-\frac {8 B^2 \operatorname {PolyLog}\left (3,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g} \]

output
-(A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2*ln((-a*d+b*c)/b/(d*x+c))/g+(A+B*ln(e*(b 
*x+a)^2/(d*x+c)^2))^2*ln(1-(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x+c))/g-4*B*(A 
+B*ln(e*(b*x+a)^2/(d*x+c)^2))*polylog(2,d*(b*x+a)/b/(d*x+c))/g+4*B*(A+B*ln 
(e*(b*x+a)^2/(d*x+c)^2))*polylog(2,(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d*x+c))/ 
g+8*B^2*polylog(3,d*(b*x+a)/b/(d*x+c))/g-8*B^2*polylog(3,(-c*g+d*f)*(b*x+a 
)/(-a*g+b*f)/(d*x+c))/g
 
3.3.76.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(1370\) vs. \(2(285)=570\).

Time = 0.42 (sec) , antiderivative size = 1370, normalized size of antiderivative = 4.81 \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx =\text {Too large to display} \]

input
Integrate[(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2/(f + g*x),x]
 
output
(-4*B^2*Log[(-(b*c) + a*d)/(d*(a + b*x))]*Log[((b*f - a*g)*(c + d*x))/((d* 
f - c*g)*(a + b*x))]^2 + A^2*Log[f + g*x] - 4*A*B*Log[a/b + x]*Log[f + g*x 
] + 4*B^2*Log[a/b + x]^2*Log[f + g*x] + 4*A*B*Log[c/d + x]*Log[f + g*x] - 
8*B^2*Log[a/b + x]*Log[c/d + x]*Log[f + g*x] + 4*B^2*Log[c/d + x]^2*Log[f 
+ g*x] + 2*A*B*Log[(e*(a + b*x)^2)/(c + d*x)^2]*Log[f + g*x] - 4*B^2*Log[a 
/b + x]*Log[(e*(a + b*x)^2)/(c + d*x)^2]*Log[f + g*x] + 4*B^2*Log[c/d + x] 
*Log[(e*(a + b*x)^2)/(c + d*x)^2]*Log[f + g*x] + B^2*Log[(e*(a + b*x)^2)/( 
c + d*x)^2]^2*Log[f + g*x] + 4*A*B*Log[a/b + x]*Log[(b*(f + g*x))/(b*f - a 
*g)] - 4*B^2*Log[a/b + x]^2*Log[(b*(f + g*x))/(b*f - a*g)] + 4*B^2*Log[a/b 
 + x]*Log[(e*(a + b*x)^2)/(c + d*x)^2]*Log[(b*(f + g*x))/(b*f - a*g)] + 8* 
B^2*Log[a/b + x]*Log[(g*(c + d*x))/(-(d*f) + c*g)]*Log[(b*(f + g*x))/(b*f 
- a*g)] - 4*B^2*Log[(g*(c + d*x))/(-(d*f) + c*g)]^2*Log[(b*(f + g*x))/(b*f 
 - a*g)] + 8*B^2*Log[(g*(c + d*x))/(-(d*f) + c*g)]*Log[((b*f - a*g)*(c + d 
*x))/((d*f - c*g)*(a + b*x))]*Log[(b*(f + g*x))/(b*f - a*g)] - 4*B^2*Log[( 
(b*f - a*g)*(c + d*x))/((d*f - c*g)*(a + b*x))]^2*Log[(b*(f + g*x))/(b*f - 
 a*g)] - 4*A*B*Log[c/d + x]*Log[(d*(f + g*x))/(d*f - c*g)] + 8*B^2*Log[a/b 
 + x]*Log[c/d + x]*Log[(d*(f + g*x))/(d*f - c*g)] - 4*B^2*Log[c/d + x]^2*L 
og[(d*(f + g*x))/(d*f - c*g)] - 4*B^2*Log[c/d + x]*Log[(e*(a + b*x)^2)/(c 
+ d*x)^2]*Log[(d*(f + g*x))/(d*f - c*g)] - 8*B^2*Log[a/b + x]*Log[(g*(c + 
d*x))/(-(d*f) + c*g)]*Log[(d*(f + g*x))/(d*f - c*g)] + 4*B^2*Log[(g*(c ...
 
3.3.76.3 Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 355, normalized size of antiderivative = 1.25, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {2954, 2804, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{f+g x} \, dx\)

\(\Big \downarrow \) 2954

\(\displaystyle (b c-a d) \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{\left (b-\frac {d (a+b x)}{c+d x}\right ) \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}\)

\(\Big \downarrow \) 2804

\(\displaystyle (b c-a d) \int \left (\frac {d \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(b c-a d) g \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {(c g-d f) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{(b c-a d) g \left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )}\right )d\frac {a+b x}{c+d x}\)

\(\Big \downarrow \) 2009

\(\displaystyle (b c-a d) \left (\frac {4 B \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{g (b c-a d)}+\frac {\log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{g (b c-a d)}-\frac {4 B \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{g (b c-a d)}-\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )^2}{g (b c-a d)}-\frac {8 B^2 \operatorname {PolyLog}\left (3,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{g (b c-a d)}+\frac {8 B^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{g (b c-a d)}\right )\)

input
Int[(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2/(f + g*x),x]
 
output
(b*c - a*d)*(-(((A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])^2*Log[1 - (d*(a + 
 b*x))/(b*(c + d*x))])/((b*c - a*d)*g)) + ((A + B*Log[(e*(a + b*x)^2)/(c + 
 d*x)^2])^2*Log[1 - ((d*f - c*g)*(a + b*x))/((b*f - a*g)*(c + d*x))])/((b* 
c - a*d)*g) - (4*B*(A + B*Log[(e*(a + b*x)^2)/(c + d*x)^2])*PolyLog[2, (d* 
(a + b*x))/(b*(c + d*x))])/((b*c - a*d)*g) + (4*B*(A + B*Log[(e*(a + b*x)^ 
2)/(c + d*x)^2])*PolyLog[2, ((d*f - c*g)*(a + b*x))/((b*f - a*g)*(c + d*x) 
)])/((b*c - a*d)*g) + (8*B^2*PolyLog[3, (d*(a + b*x))/(b*(c + d*x))])/((b* 
c - a*d)*g) - (8*B^2*PolyLog[3, ((d*f - c*g)*(a + b*x))/((b*f - a*g)*(c + 
d*x))])/((b*c - a*d)*g))
 

3.3.76.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2804
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{ 
u = ExpandIntegrand[(a + b*Log[c*x^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] / 
; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]
 

rule 2954
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d) 
 Subst[Int[(b*f - a*g - (d*f - c*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m 
 + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B 
, n}, x] && EqQ[n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && IntegerQ[m 
] && IGtQ[p, 0]
 
3.3.76.4 Maple [F]

\[\int \frac {{\left (A +B \ln \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )\right )}^{2}}{g x +f}d x\]

input
int((A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f),x)
 
output
int((A+B*ln(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f),x)
 
3.3.76.5 Fricas [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{g x + f} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f),x, algorithm="fricas" 
)
 
output
integral((B^2*log((b^2*e*x^2 + 2*a*b*e*x + a^2*e)/(d^2*x^2 + 2*c*d*x + c^2 
))^2 + 2*A*B*log((b^2*e*x^2 + 2*a*b*e*x + a^2*e)/(d^2*x^2 + 2*c*d*x + c^2) 
) + A^2)/(g*x + f), x)
 
3.3.76.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=\text {Timed out} \]

input
integrate((A+B*ln(e*(b*x+a)**2/(d*x+c)**2))**2/(g*x+f),x)
 
output
Timed out
 
3.3.76.7 Maxima [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{g x + f} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f),x, algorithm="maxima" 
)
 
output
A^2*log(g*x + f)/g - integrate(-(4*B^2*log(b*x + a)^2 + B^2*log(e)^2 + 2*A 
*B*log(e) + 4*(B^2*log(e) + A*B)*log(b*x + a) - 4*(2*B^2*log(b*x + a) + B^ 
2*log(e) + A*B)*log(d*x + c))/(g*x + f), x)
 
3.3.76.8 Giac [F]

\[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (b x + a\right )}^{2} e}{{\left (d x + c\right )}^{2}}\right ) + A\right )}^{2}}{g x + f} \,d x } \]

input
integrate((A+B*log(e*(b*x+a)^2/(d*x+c)^2))^2/(g*x+f),x, algorithm="giac")
 
output
integrate((B*log((b*x + a)^2*e/(d*x + c)^2) + A)^2/(g*x + f), x)
 
3.3.76.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )^2}{f+g x} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )\right )}^2}{f+g\,x} \,d x \]

input
int((A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2/(f + g*x),x)
 
output
int((A + B*log((e*(a + b*x)^2)/(c + d*x)^2))^2/(f + g*x), x)